home *** CD-ROM | disk | FTP | other *** search
- /* Fchart - fchart.h
- *
- * Copyright (C) 1990 Piotr Filip Sawicki
- *
- * Permission to use, copy, and distribute this software and its
- * documentation for any purpose with or without fee is hereby granted,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.
- *
- * Permission to modify the software is granted, but not the right to
- * distribute the modified code. Modifications are to be distributed
- * as patches to released version.
- *
- * This software is provided "as is" without express or implied warranty.
- *
- * send your comments or suggestions to fs@uwasa.fi
- *
- */
-
- #ifdef PROGRAM
- #undef PROGRAM
- #endif
- #ifdef PROMPT
- #undef PROMPT
- #endif
- #ifdef HELP
- #undef HELP
- #endif
-
- #define PROGRAM "FCHART"
- #define PROMPT "command> "
- #define EXP_PROMPT "cont: "
-
- #ifdef vms
- #define HELP "fchart "
- #else /* vms */
- #define HELP "/usr/local/bin/help fchart"
- #endif /* vms */
-
- #ifdef TERM
- #undef TERM
- #endif
-
- #ifdef PC
- #define TERM "egalib"
- #else
- #ifdef UNIXPC
- #define TERM "unixpc"
- #else
- #define TERM "tek40xx" /* put your most common term type here! */
- #endif
- #endif
-
- enum DRAW_STYLE {
- SBAR, ABARS, LAYB, PIECHART
- };
-
- enum GRAV_DIR {
- NORTH=0, WEST=1, SOUTH=2, EAST=3, DEFAULT /* for exploding parts of piechart only */
- };
-
- enum INP_STYLE {
- GNUPLOT, PRIVATE, CUSTOMD
- };
-
- enum FONT_STYLE {
- F_NEVER=0, F_WHENN=1, F_ROTAT=2, F_ALWYS=3
- };
-
- #define HL_MIN -3
- #define HL_MAX -2
- #define HL_NON -1
- extern int HLitem;
-
- struct pair {
- int from, upto;
- };
-
- #ifdef PC
- typedef float vreal; /* "virtual" real */
- #define CH_INIT_SIZE 50 /* initial size of data chunk */
-
- #else
- typedef double vreal;
- #define CH_INIT_SIZE 200
-
- #endif
-
- struct chunk { /* chunk of data */
- vreal *dval; /* array of values */
- char **vlbl; /* array of labels */
- int used; /* number of used elements */
- struct chunk *next; /* next chunk */
- };
-
- struct dfile { /* NORMAL FILE record */ /* DATA_HEAD */
- char *fname; /* name of data file */ /* title of the picture */
- vreal d_min, d_max; /* min & max data value */ /* min & max of all values */
- int points, chunks; /* number of points and chunks */ /* total num. of points and files */
- int makeHL; /* item to highlit */ /* global HL request */
- BOOLEAN labels; /* can we generate labels? */ /* global autolabel request */
- struct chunk *data; /* head of chunk list */ /* used for indexes when xploting */
- struct dfile *dnxt; /* next data file */ /* begining of file list */
- };
-
- struct xptr { /* structure for cross ploting thru several data files */
- struct chunk *chnp; /* pointer to current chunk */
- int vindex; /* index to current element in it */
- };
-
- #ifdef NO_ROMAN_FONT
- struct Char {
- int wid;
- unsigned char *def[3];
- };
- #define CHAR_OFF 100
- #define CHAR_GRD 256
- #else
- struct Char {
- int wid;
- int *def;
- };
- #define CHAR_OFF 10
- #define CHAR_GRD 80
- #endif
-
- typedef double MATRIX[3][3];
-
- extern BOOLEAN interactive;
-
- enum LAB_ROT { /* order sagnificant */
- L_NORMAL, L_BOTTOM, L_UPSIDE, L_TOP, L_RANDOM
- };
-
- struct label_def {
- struct label_def *next; /* pointer to next label in linked list */
- int tag; /* identifies the label */
- double x,y; /* position ... */
- BOOLEAN paged; /* on page or picture */
- enum JUSTIFY pos;
- char text[MAX_LINE_LEN+1];
- enum LAB_ROT rot;
- double h, w, a; /* height, width, angle */
- };
-
- #define RESOLUTION 100000 /* ideal resolution for labels */
-
- struct linearrow_def {
- struct linearrow_def *next; /* pointer to next arrow in linked list */
- BOOLEAN arrow; /* arrow or line */
- int tag; /* identifies the arrow */
- double sx,sy; /* start position ... */
- BOOLEAN startp; /* ... on page ? */
- double ex,ey; /* end position ... */
- BOOLEAN endp; /* ... on page ? */
- };
-
-
-